home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / gnustuff / tos / progut~1 / stdwin.zoo / vt / vtusesend.c < prev    next >
Encoding:
C/C++ Source or Header  |  1989-10-17  |  427 b   |  25 lines

  1. /* VT functions that send data back to the serial port. */
  2. /* $Header: vtusesend.c,v 1.3 88/06/20 22:36:17 guido Exp $ */
  3.  
  4. #include "vtimpl.h"
  5. #include "vtserial.h"
  6.  
  7. void
  8. vtsendid(vt)
  9.     VT *vt;
  10. {
  11.     vtsend(vt, "\033[?0;0;0c", -1);
  12. }
  13.  
  14. void
  15. vtsendpos(vt)
  16.     VT *vt;
  17. {
  18.     char buf[256];
  19.     int row= vt->cur_row - vt->topterm + 1;
  20.     int col= vt->cur_col + 1;
  21.     CLIPMIN(row, 1);
  22.     sprintf(buf, "\033[%d;%dR", row, col);
  23.     vtsend(vt, buf, -1);
  24. }
  25.